<?php 
namespace Lib;

date_default_timezone_set('prc');

class Time
{
	
	private static $time;

	private static $now;

	public static function add($name)
	{	
		$now=microtime(true);

		$use_time=self::$now?($now-(self::$now)):0;

		self::$now=$now;
		
		self::$time[$name]=array('记录时间'=>date('Ymd H:i:s',$now),'使用时间'=>($use_time)."秒");
	}

	public static function result()
	{	
		self::add('输出时间');
		return self::$time;
	}
}


?>